package com.pandajs;

import java.util.Arrays;

public class Luncher {
	public static void main(String[] args) {
		boolean debug = false;
		if (args.length > 0 && args[0].equals("-d")) {
			args = Arrays.copyOfRange(args, 1, args.length);
			debug = true;
		}

		if (args.length == 0) {
			args = new String[] { "scripts/server.js" };
		}

		if (debug) {
			org.mozilla.javascript.tools.debugger.Main.main(args);
		} else {
			org.mozilla.javascript.tools.shell.Main.main(args);
		}
	}
}
